﻿
@{
    Layout = "~/Views/Shared/_mainLayout.cshtml";
    ViewBag.username = Session["username"];
    List<SalaryManagementSystem.Models.StaffersModel> list = new SalaryManagementSystem.Models.sqlhelper().StafferList();
}

<div class="container-fluid cm-container-white">
    <p>员工数据</p>
</div>
<div class="container-fluid cm-container-white">
    <p>员工数据表</p>
    <table style="width:90%;" align="center">
            <p style="color:red">@ViewBag.notice</p>
            <tr style="height:50px;text-align:center;border-bottom:1px solid grey">
                <td>用户ID</td>
                <td>姓名</td>
                <td>性别</td>
                <td>职务</td>
                <td>入职时间</td>
                <td>月薪(元)</td>
                <td>薪资更新时间</td>
                <td>类别</td>
                <td>备注</td>
                <td colspan="2">操作</td>
            </tr>
            @foreach (SalaryManagementSystem.Models.StaffersModel s in list)
            {
                <tr style="height:50px;text-align:center;" >
                    <td>@s.id</td>
                    <td>@s.stafferName</td>
                    <td>@s.sex</td>
                    <td>@s.job</td>
                    <td>@s.getJobTime</td>
                    <td>@s.salary</td>
                    <td>@s.updateTime</td>
                    <td>@s.stafferType</td>
                    <td>@s.note</td>
                    <td><a href="Edit/@s.id">修改</a></td>
                    <td><a href="StafferEdit?id=@s.id" onclick="return confirm('是否删除此条数据?')">删除</a></td>
  </tr>
            }
    </table>
</div>
<div class="container-fluid cm-container-white">
    <p>数据添加</p>
    <div>
        <form method="post" action="/Admin/StafferEdit">
            <table align="center" style="width:280px">
                <tr style="text-align:center;height:40px">
                    <td colspan="2">员工添加</td>
                    <p style="color:red">@ViewBag.notice</p>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>姓名:</td>
                    <td><input id="username" name="username" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>性别:</td>
                    <td><input id="usersex" name="usersex" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>账号:</td>
                    <td><input id="useraccount" name="useraccount" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>密码:</td>
                    <td><input id="userpwd" name="userpwd" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>职务:</td>
                    <td><input id="userjob" name="userjob" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>入职时间:</td>
                    <td><input id="usergetjobtime" name="usergetjobtime" type="datetime" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>月薪(元):</td>
                    <td><input id="usersalary" name="usersalary" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>类别:</td>
                    <td><input id="staffertype" name="staffertype" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td>备注:</td>
                    <td><input id="note" name="note" type="text" value="" /></td>
                </tr>
                <tr style="text-align:center;height:40px">
                    <td colspan="2"><input type="submit" value="提交" onclick="return confirm('确认提交吗?')" /></td>
                </tr>
            </table>
        </form>
    </div>
</div>

